﻿<Window x:Class="ULSDeobfuscator.MVVM.Controls.PromptWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ULSDeobfuscator.MVVM.Controls"
        mc:Ignorable="d"
        WindowStartupLocation="CenterOwner"
        d:DataContext="{d:DesignInstance local:PromptWindow}"
        Title="{Binding Caption}" 
        Height="200" Width="300"
        FocusManager.FocusedElement="{Binding ElementName=_answer}">
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="10"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="10"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Text="{Binding Text}"
                   TextWrapping="Wrap"/>
        <TextBox Text="{Binding Answer}"
                 x:Name="_answer"
                 Grid.Row="2" AcceptsReturn="True" TextWrapping="Wrap"/>

        <StackPanel HorizontalAlignment="Right"
                    Orientation="Horizontal"
                    Grid.Row="4"
                    Margin="0, 0, 5, 5">

            <Button Click="OnOk"
                    Style="{StaticResource LargeButtonStyle}"
                    IsDefault="True"
                    HorizontalAlignment="Left">
                OK
            </Button>
            <Button Click="OnCancel"
                    IsCancel="True"
                    Style="{StaticResource LargeButtonStyle}"
                    Margin="20, 0, 0, 0"
                    HorizontalAlignment="Right">
                Cancel
            </Button>
        </StackPanel>
    </Grid>
</Window>
